package com.siva.domain.sivadao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface DemoMapper {
    
    @Select("SELECT NAME FROM DEMO WHERE ID = #{id}")
    String findById(@Param("id") long id);
    
    @Select("SELECT NAME FROM DEMO WHERE NAME = #{name}")
    String findByName(@Param("name") String name);
    
    @Insert("INSERT INTO DEMO(NAME) VALUES(#{name})")
    int insert(@Param("name") String name);
}
